package com.pxxy.entity;

import java.time.LocalDate;
import java.util.List;
import java.util.Objects;

/******************
 * @Author yejf
 * @Description TODO
 */
public class Member {

    private Integer id;

    private String name;

    private String mobilePhone;

    private Gender gender;

    private LocalDate birth;

    private String remark;

    private List<MemberCard> cardList;

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Member{");
        sb.append("id=").append(id);
        sb.append(", name='").append(name).append('\'');
        sb.append(", mobilePhone='").append(mobilePhone).append('\'');
        sb.append(", gender=").append(gender);
        sb.append(", birth=").append(birth);
        sb.append(", remark='").append(remark).append('\'');
        sb.append('}');
        return sb.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Member member = (Member) o;
        return Objects.equals(id, member.id) &&
                Objects.equals(name, member.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public Gender getGender() {
        return gender;
    }

    public void setGender(Gender gender) {
        this.gender = gender;
    }

    public LocalDate getBirth() {
        return birth;
    }

    public void setBirth(LocalDate birth) {
        this.birth = birth;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<MemberCard> getCardList() {
        return cardList;
    }

    public void setCardList(List<MemberCard> cardList) {
        this.cardList = cardList;
    }
}
